Modern control devices use microprocessors which are often powerful enough to process several tasks in parallel. This capacity is particularly used in systems for process control, in which a single computer fulfills several regulation and control functions at the same time. Particularly in the motor vehicle sector, control devices which must perform very complex control tasks are often used. Examples of these are engine control devices, transmission control devices, etc. In order to achieve quasi-simultaneous processing on the computer, methods are used to switch back and forth between the individual tasks. Typically, an operating system is used in the control devices for this purpose.
A method of this type is already known from the article by Bernd Ackermann, Requirements for a real-time operating system for "embedded systems", Electronics, No. 18, 1992, pages 120 to 128. This article explains important characteristics of real-time operating systems for control devices containing microcomputers. A program called a process manager is responsible for sequence control, i.e. coordination of the individual task programs. This program controls the assignment of the CPU and coordinates all the task programs that are running (tasks). The process manager allows quasi-parallel processing of several tasks, also referred to as multitasking. The process manager described in the report is designed in such a way that it can interrupt a program that is being processed, at any time, in order to start a task which is currently more important (has a higher priority) for the work of the system as a whole. The interrupted program is continued at the interruption point, as soon as processing of the program with higher priority has been completed. The method of procedure, that is where a task which is currently being processed can be interrupted at any time, is also referred to as preemptive scheduling or preemptive multitasking.
In addition, cooperative scheduling or cooperative multitasking is also known in the literature. In this type of sequence control, it is possible to switch between different tasks only at certain switching points previously established in the program. In other words, a task cannot be interrupted at a random point.
In general, it is necessary to have a data exchange between the programs which run simultaneously. For example, measured input variables or deviations from a rule are reported to other tasks usually, the data exchange between the individual tasks takes place via common memory locations, also called global variables. If a preemptive switching strategy is selected for switching between the tasks, the following problem occurs during data exchange via common memory locations:
If the task accesses the global variable at several points, the global variable can have different values at the different access points, specifically if a task with a higher priority interrupts the first program and changes the value of the global variable while it is being processed. The result is that the input variables of a program can change during processing. This can result in errors during processing. This problem is called data inconsistency. If, on the other hand, the input variables for a task do not change during the entire processing period, this represents data consistency.